import db_helper
import calcConstantEvn




def main():
    reckon()
    pass


def reckon():

    blueTallest = ''
    blueLow=''
    with db_helper.buildDbHelper() as db:
        recordsTallest = db.executeQuerySql(calcConstantEvn.searchTallestSql)
        recordsTall=''
        for i in range(6):
            # print(recordsTallest[i][1])
            recordsTall += f"{recordsTallest[i][1]} "
            i=i+1
        print(f'最高: {recordsTall}')
        blueTallest = f"{recordsTallest[6][1]} "
        
        recordsTallest = db.executeQuerySql(calcConstantEvn.searchLowSql)
        recordsTall=''
        for i in range(6):
            # print(recordsTallest[i][1])
            recordsTall += f"{recordsTallest[i][1]} "
            i=i+1
        print(f'最低: {recordsTall}')
        blueLow = f"{recordsTallest[6][1]} "
        
        recordsTallest = db.executeQuerySql(calcConstantEvn.searchTallRed)
        recordsTall=''
        for i in range(6):
            # print(recordsTallest[i][1])
            recordsTall += f"{recordsTallest[i][0]} "
            i=i+1
        print(f'最高: {recordsTall}')

        
        recordsTallest = db.executeQuerySql(calcConstantEvn.searhcLowRed)
        recordsTall=''
        for i in range(6):
            # print(recordsTallest[i][1])
            recordsTall += f"{recordsTallest[i][0]} "
            i=i+1
        print(f'最低: {recordsTall}')

        print(f'最高单: {blueTallest}')
        print(f'最低单: {blueLow}')
    pass



if __name__ == '__main__':
    main()